//
//  UIImage+Color.m
//  TanTanDemo
//
//  Created by wei1 on 2016/12/2.
//  Copyright © 2016年 qge. All rights reserved.
//

#import "UIImage+Color.h"

@implementation UIImage (Color)

+(UIImage *)imageWithColor:(UIColor *)color{
    UIGraphicsBeginImageContext(CGSizeMake(100, 100));
  //  CGContextRef ctx = UIGraphicsGetCurrentContext();
    UIBezierPath *path = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 100, 100)];
    [color setFill];
    [path fill];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}

@end
